<ui:composition template="/WEB-INF/templates/main-template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="sidebar">
		<ui:include src="/WEB-INF/templates/public-sidebar.xhtml" />
	</ui:define>
	<ui:define name="content">
		<h:form>
			<p:focus for="leaveType"/>
			<p:growl />
			<h:outputText value="New Leave Type" styleClass="outputTextTitle" />
			<h:panelGrid columns="2">
			<h:panelGrid columns="3">
				<h:outputLabel value="#{msg['leavetype.label']}" />
				<h:outputLabel value=" : " />
				<p:inputText id="leaveType"  value="#{createLeaveTypeBean.leaveType.leaveType}"/>
				
				<h:outputLabel value="No of Leaves" />
				<h:outputLabel value=" : " />
				<p:inputText   value="#{createLeaveTypeBean.leaveType.noOfLeaves}"/>
				
				<h:outputLabel value="#{msg['displayname.label']}" />
				<h:outputLabel value=" : " />
				<p:inputText id="displayName"  value="#{createLeaveTypeBean.leaveType.displayname}"/>
				
				<h:outputLabel value="#{msg['dispalyorder.label']} " />
				<h:outputLabel value=" : " />
				<p:inputText id="displayOrder"  value="#{createLeaveTypeBean.leaveType.displayOrder}"/>
				
				<h:outputLabel value="#{msg['description.label']} " />
				<h:outputLabel value=" : " />
				<p:inputTextarea  />
				
				<h:inputHidden />
				<h:inputHidden />
				<p:commandButton value="Save Leave Type" actionListener="#{createLeaveTypeBean.saveLeaveType}" ajax="false" update="@form"/>
			
			</h:panelGrid>
			 <h:panelGrid style="margin-top:-20px;margin-left:50px;">
			  <h:outputText value="Assign Roles" styleClass="outputTextTitle" />
			  <h:panelGrid columns="3">
			 <p:selectManyCheckbox value="#{createLeaveTypeBean.selectedRoleIds}" layout="pageDirection">  
                <f:selectItems value="#{createLeaveTypeBean.rolesMap}"></f:selectItems>
             </p:selectManyCheckbox>  
			 </h:panelGrid>
			 </h:panelGrid>
			 
			</h:panelGrid>
        </h:form>
	</ui:define>
</ui:composition>